Get Transaction Status
Path
- URL:
/cb-core/api/v1/get-transaction-status - Method:
POST - Description: API get transaction info.
Request
Request table
| Params | Data Type + Length | Required | Description |
|---|---|---|---|
| request_id | string(50) | Yes | The unique code that corresponds to an upload request. Format: MerchantCode + BK + YYYYMMDD + UniqueId |
| request_time | string(19) | Yes | The timestamp for sending the request from Merchant. Format: YYYY-MM-DD HH:MM:SS |
| merchant_code | string(20) | Yes | Merchant code provided by Baokim before integration |
| reference_id | string(50) | Optional | If transaction_type = 1, reference_id in response of Webhook notice transaction status If transaction_type = 2, reference_id in request of API Create FX transaction If transaction_type = 3, reference_id in response of Webhook notice transaction status If transaction_type = 4, reference_id in request of API Create Disbursement Transaction If transaction_type = 5, reference_id in request of Webhook notice transaction status If transaction_type = 6, reference_id in request of API Create Order Refund If transaction_type = 7, reference_id in request of Webhook notice transaction status |
| transaction_id | string(50) | Optional | TransactionID of Baokim. Required if reference_id is null |
Request Example
{
"request_id": "BK2023110612345",
"request_time": "2023-11-06 15:30:45",
"merchant_code": "MerchantCode",
"reference_id": "BK2023110698765",
"transaction_id": "BK202311069812"
}
Response
Response Tables
| Params | Data Type + Length | Description |
|---|---|---|
| response_code | int(4) | Error code from Baokim as per Error Codes Table |
| response_message | string(200) | Description of the error code from Baokim as per Error Codes Table |
| reference_id | string(50) | The same reference_id in the request |
| transaction_id | string(50) | TransactionID of Baokim |
| transaction_time | string(19) | Time when transaction is recorded by Baokim. Format: YYYY-MM-DD HH:MM:SS |
| transaction_type | int(1) | Type of transaction: 1. Collection transaction 2. FX transaction 3. Deposit transaction 4. Disbursement 5. Disbursement Refund 6. Order Refund 7. Fee |
| transaction_status | int(4) | The transaction status 200: Success 11: Fail 99: Pending 201: Cancelled |
| transaction_payment_method | string(20) | When transaction_type = 1, The payment method of the transaction is VA/ATM/CREDIT/QRCODE The other transaction_type, send null |
| transaction_merchant_fee | decimal(10,3) | Fees charged to Merchant on each transaction. And it will be deducted into amount when the transaction is occurring |
| transaction_remitter_fee | decimal(10,3) | Fees charged to Remitter when transferring the fund. And it will be deducted into amount when the transaction is occurring |
| bene_bank_no | string(20) | This is the bank of beneficiary. bank_no in the response of API Get bank list |
| bene_acc_no | string(22) | This is the account number of beneficiary |
| bene_acc_name | string(50) | Full bank account name of the beneficiary |
| bene_acc_type | int(1) | This is the account type of beneficiary. 0 for bank account number, 1 for bank card number |
| amount | decimal(18,2) | The amount that is requested to disburse to beneficiary, to do FX. Or the amount collected into VA |
| actual_bene_amount | decimal(18,2) | Actual amount transferred to the beneficiary. |
| exchange_rate | decimal | The exchange rate of the transaction. If there is no FX, return exchange rate=1 |
| exchange_amount | decimal(18,2) | The amount after FX conversion into target currency |
| request_currency | string(50) | The currency code of the request FX. Ex: VND, USD |
| target_currency | string(50) | The currency code of the target FX. Ex: VND, USD |
| memo | string(50) | If transaction_type = 1, return memo with the structure:. For example: NGUYEN VAN A transfers money (970423 02050895023). If transaction type = 4, return memo of Disbursement request |
| refunded_reference_id | string(16) | When transaction_type = 5 or transaction_type = 6, it is the reference_id of transaction which is refunded |
| detail_status | string(200) | Detail description of the error code from Baokim |
| refunded_transaction_id | string(50) | TransactionID of Baokim which is refunded when transaction_type = 5 or transaction_type = 6 |
| is_refunded | array | List of refunded TransactionId of Baokim when transaction_type = 1 |
Response Example
{
"response_code": 200,
"response_message": "Success",
"reference_id": "BK2023110698765",
"transaction_id": "BK2023110698765",
"transaction_time": "2023-11-06 15:30:45",
"transaction_type": 1,
"transaction_status": 200,
"transaction_payment_method": "AAA",
"transaction_merchant_fee": 10.500,
"transaction_remitter_fee": 5.000,
"bene_bank_no": "970423",
"bene_acc_no": "123456789012",
"bene_acc_name": "John Doe",
"bene_acc_type": 1,
"amount": 100000.00,
"actual_bene_amount": 98000.00,
"exchange_rate": 1,
"exchange_amount": 98000.00,
"request_currency": "VND",
"target_currency": "VND",
"memo": "NGUYEN VAN A transfers money (970423 123456789012)",
"refunded_reference_id": "DISB1234567890",
"refunded_transaction_id": "1234567892",
"detail_status": "Success",
"is_refunded": []
}
Error Code
| Response Code | Response Message |
|---|---|
| 200 | Success |
| 99 | Pending |
| 11 | Failed |
| 101 | System Error |
| 110 | Merchant Code Invalid |
| 120 | Invalid Signature |
| 422 | Validation Error |
| 1100 | Transaction does not exist |